<div class="box laster custom">
    <div class="box-content">
        <div class="product-grid" style="padding:10px;"> 
<?php
		$sql = 'SELECT * FROM '.Tbladvertise::tbladvertise.'  WHERE  '.Tbladvertise::status.' = 1  AND  '.Tbladvertise::page.' = 1  AND ' .Tbladvertise::position. ' = "right" ORDER BY '.Tbladvertise::date_modified.' DESC LIMIT 10';
		$result = mysql_query($sql);
	if(mysql_num_rows($result)>0){
	 	while ($row = mysql_fetch_object($result)) {
			if(strtotime($row->{Tbladvertise::dateendpost}) > strtotime(date("Y-m-d"))){
			?>
			<div class="image" >
				<a href="<?php echo $row->{Tbladvertise::link} ?>" target="_blank">
		<img class="image_product_tap" src="<?php echo 'images/advertise/' . $row->{Tbladvertise::image} . '"'; ?>" style="margin:auto;width:100%;border:0px solid #063;"/>
				</a>
			</div><p></p>
		<?php
			}
		}
	 }else{
		echo '<div class="image" style="overflow:hidden;text-align:center;border:1px solid #ccc;">';
		echo '<a href="#"><img class="image_product_tap" src="images/advertise/home_right_default_advertise.png" style="margin:auto;width:100%;border:0px solid #063;" /></a>';
		echo '</div><p></p>';
		
		echo '<div class="image" style="overflow:hidden;text-align:center;border:1px solid #ccc;">';
		echo '<a href="#"><img class="image_product_tap" src="images/advertise/home_right_default_advertise.png" style="margin:auto;width:100%;border:0px solid #063;" /></a>';
		echo '</div><p></p>';
	}
?>
        </div>
    </div>
</div>